package com.justnow.offer;

/**
 * @author justnow
 * Created on 2020-10-11
 * Description
 */
public class Wm02 {
    public int getPayCount (int n) {
        // write code here
        int money[] = {1, 2, 5, 10};
        int dp[] = new int[n + 1];
        dp[0] = 1;
        for (int i = 0; i < 4; i++) {
            for (int j = money[i]; j <= n; j++) {
                dp[j] = dp[j] + dp[j-money[i]];
            }
        }
        return dp[n];
    }
}
